package com.wmh.baseservice.merchant.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wmh.baseservice.common.mybatisplus.methods.CommonServiceImpl;
import com.wmh.baseservice.merchant.pojo.MerchantVegetablePlot;
import com.wmh.baseservice.merchant.mapper.MerchantVegetablePlotMapper;
import com.wmh.baseservice.merchant.service.MerchantVegetablePlotService;
import com.wmh.baseservice.user.pojo.vo.PlotSearch;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author wmh generator
 * @since 2021-12-24
 */
@Service
public class MerchantVegetablePlotServiceImpl extends CommonServiceImpl<MerchantVegetablePlotMapper, MerchantVegetablePlot> implements MerchantVegetablePlotService {


    @Resource
    private MerchantVegetablePlotMapper merchantVegetablePlotMapper;
    /**
     * 获得土地列表
     */
    @Override
    public IPage<MerchantVegetablePlot> getVegetablePlotList(Page<MerchantVegetablePlot> vegetablePagePlot, Map<String, Object> map) {
        return merchantVegetablePlotMapper.getVegetablePlotList(vegetablePagePlot,map);
    }

    /**
     * 用户端-土地列表
     */
    @Override
    public IPage<MerchantVegetablePlot> usPlotList(Page<MerchantVegetablePlot> vegetablePage, Map<String, Object> map) {
        return merchantVegetablePlotMapper.usPlotList(vegetablePage,map);
    }

    @Override
    public MerchantVegetablePlot plotDetail(Map<String, Object> map) {
        return merchantVegetablePlotMapper.plotDetail(map);
    }

    @Override
    public Long getMerchantId(Long id) {
        return merchantVegetablePlotMapper.getMerchant(id);
    }

    /**
     * 附近好地搜索
     */
    @Override
    public IPage<PlotSearch> searchList(Page<PlotSearch> page, Map<String, Object> map) {
        return merchantVegetablePlotMapper.searchList(page,map);
    }
}
